<?php
// +----------------------------------------------------------------------
// | Copyright © Sogu Technologies Co. Ltd 2018-2050 All rights reserved.
// +----------------------------------------------------------------------
// | File name: AdminFactory.php
// +----------------------------------------------------------------------
// | Author: gxs
// +----------------------------------------------------------------------
// | Description: 管理员工厂
// +----------------------------------------------------------------------
// | Others: 其他内容的说明
// +----------------------------------------------------------------------
// | History:
// +----------------------------------------------------------------------
// | 1.Date: 2018/12/28 Author: gxs Modification: 创建
// +----------------------------------------------------------------------

use Faker\Generator as Faker;

$factory->define(\App\Models\Admin::class, function (Faker $faker) {
    static $password;

    return [
        'account' => $faker->unique()->userName,
        'password' => $password ?: $password = bcrypt('123456'),
        'mobile' => $faker->numberBetween(11111111111,99999999999),
        'email' => $faker->email,
        'post' => $faker->words(3, true),
        'login_ip' => $faker->ipv4,
        'login_time' => $faker->time('Y-m-d H:i:s'),
    ];
});
